<?php
$arr=array("石头","剪刀","布");
$name=$arr[rand(0,2)];
if($_POST['te']=='石头'&&$name=='剪刀'||$_POST['te']=='剪刀'&&$name=='布'||$_POST['te']=='布'&&$name=='石头'){
    echo '你赢了';
}
if($_POST['te']=='剪刀'&&$name=='石头'||$_POST['te']=='布'&&$name=='剪刀'||$_POST['te']=='石头'&&$name=='布'){
   echo '你输了';
}
if($_POST['te']==$name){
    echo '平局';
}